﻿Imports System.Runtime.CompilerServices

Public Module TemplateInfoExtensions

    <Extension()>
    Public Function BeginHtmlPrefix(ByVal templateInfo As TemplateInfo, ByVal prefix As String) As IDisposable
        Dim result As New HtmlPrefixContext With {
            .TemplateInfo = templateInfo,
            .PreviousPrefix = templateInfo.HtmlFieldPrefix,
            .Prefix = prefix
        }
        templateInfo.HtmlFieldPrefix = prefix
        Return result
    End Function

End Module
